package com.team.employment.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import org.springframework.beans.factory.annotation.Autowired;

public enum EntityType implements BaseEnum{

/*
        Spring 默认将 首字母小写 的类名作为 Bean 名称;
        实际注册的是实现类名称 (benefitInfoServiceImpl)
     */


    BenefitEntity(1, "BenefitInfoService"),

    CompanyEntity(2, "CompanyInfoService"),
    PolicyEntity(3, "PolicieInfoService"),
    RecruitmentEntity(4, "RecruitmentInfoService"),
    ResumeEntity(5, "ResumeInfoService"),
    StatutoryEntity(6, "StatutoryInfoService"),
    UserEntity(7, "UserInfoService");


    @EnumValue
    @JsonValue
    private Integer code;

    private String name;

    EntityType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }
}
